package org.glow.chaggou.item.controller;

import org.glow.chaggou.item.service.PageService;
import org.glow.changgou.entity.Result;
import org.glow.changgou.entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author Glow
 * @Date 2022-09-30 18:12:24
 * @Description
 * @Version 1.0
 */
public class PageController {
    @Autowired
    private PageService pageService;

    /**
     * 生成静态页面
     * @param id
     * @return
     */
    @RequestMapping("/createHtml/{id}")
    public Result createHtml(@PathVariable(name="id") Long id){
        pageService.createPageHtml(id);
        return new Result(true, StatusCode.OK,"ok");
    }
}
